package model

type OrderItem struct {
	OrderItemId   uint   `json:"orderItemId" gorm:"type:bigint;primary_key;not null;autoIncrement"`
	OrderId       uint   `json:"orderId" gorm:"type:bigint;not null"`
	GoodsId       uint   `json:"goodsId" gorm:"type:bigint;not null"`
	GoodsName     string `json:"goodsName" gorm:"type:varchar(200);not null"`
	GoodsCoverImg string `json:"goodsCoverImg" gorm:"type:varchar(200);not null"`
	SellingPrice  uint   `json:"sellingPrice" gorm:"type:int;not null"`
	GoodsCount    uint   `json:"goodsCount" gorm:"type:int;not null	"`
	CreateTime    Time   `json:"createTime" gorm:"type:datetime;not null;default:current_timestamp"`
}

// TableName 自定义表明，不适用默认的mall_users
func (receiver OrderItem) TableName() string {
	return "tb_newbee_mall_order_item"
}
